import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute, NavigationEnd } from '@angular/router';
import {filter} from "rxjs/operators"


@Component({
  selector: 'app-sidebar',
  templateUrl: './sidebar.component.html',
  styleUrls: ['./sidebar.component.css']
})
export class SidebarComponent implements OnInit {
  currentRoute=''
  constructor(
    private router:Router
  ) { }

  ngOnInit(): void {
    this.currentRoute = this.router.url
    
  }

  navigate(url): void {

    this.router.navigateByUrl(url+'?id=2')
  }

}
